<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
String path = request.getContextPath();
%>
<html>
  <head>
    <title>选项配置选项</title>
	<link href="css/index_css.css" rel="stylesheet" type="text/css" />
	<script src="<%=path%>/js/resizeIframe.js" type="text/javascript"></script>
	<script type="text/javascript">
      function doAddCode(codeId)
      {
      	//2011-5-24 闷男，删除无意义代码
      	var returnStr=window.showModalDialog("<%=path %>/findCodeSelectByIdCodeMaintenanceAction.action?codeMaintenanceType.codeId="+codeId+"&t="+new Date(),'',"dialogHeight:280px;dialogWidth:400px;help=0;scroll=1;");
        if(returnStr=="true"){   	
    		window.location.href="<%=path%>/findCodeMaintenanceTypeByIdCodeMaintenanceAction.action?codeMaintenanceType.codeId=${codeMaintenanceType.codeId}&t="+new Date();
    	}	
      }
      function doUpdateCode(codeId,valueId)
      {
      	var returnSS=window.showModalDialog("<%=path %>/findCodeSelectByIdCodeMaintenanceAction.action?codeMaintenanceType.codeId="+codeId+"&codeSelect.valueId="+valueId+"&editType=update&t="+new Date(),'',"dialogHeight:280px;dialogWidth:400px;help=0;scroll=1;");
      	if(returnSS=="true")
      	{
      		window.location.href="<%=path%>/findCodeMaintenanceTypeByIdCodeMaintenanceAction.action?codeMaintenanceType.codeId=${codeMaintenanceType.codeId}&t="+new Date();
      	}
      }
      //值只能是数字的情况
      function doAddCode1(codeId)
      {
      	var returnStr=window.showModalDialog("<%=path %>/findCodeSelectByIdCodeMaintenanceAction.action?codeMaintenanceType.codeId="+codeId+"&inputInteger=yes&t="+new Date(),'',"dialogHeight:280px;dialogWidth:400px;help=0;scroll=1;");
        if(returnStr=="true"){   	
    		window.location.href="<%=path%>/findCodeMaintenanceTypeByIdCodeMaintenanceAction.action?codeMaintenanceType.codeId=${codeMaintenanceType.codeId}&t="+new Date();
    	}	
      }
      function doUpdateCode1(codeId,valueId)
      {
      	var returnSS=window.showModalDialog("<%=path %>/findCodeSelectByIdCodeMaintenanceAction.action?codeMaintenanceType.codeId="+codeId+"&codeSelect.valueId="+valueId+"&inputInteger=yes&editType=update&t="+new Date(),'',"dialogHeight:280px;dialogWidth:400px;help=0;scroll=1;");
      	if(returnSS=="true")
      	{
      		window.location.href="<%=path%>/findCodeMaintenanceTypeByIdCodeMaintenanceAction.action?codeMaintenanceType.codeId=${codeMaintenanceType.codeId}&t="+new Date();
      	}
      }
      
      function load()
	  {
		resizeIframe();
		parent.scroll(0,0);
		<c:if test="${not empty requestScope.errorAlert}">
			alert('${requestScope.errorAlert}');
		</c:if>
	  }
	</script>

  </head>
  
  <body onload="load();"> 
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td align="left" valign="top" bgcolor="#ECE9D8" class="border_2"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td align="left" valign="top" class="tb_10 border_2"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td align="left" valign="bottom"><table width="150" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td width="5" align="left" valign="bottom" background="<%=path%>/images/sywesp_18.gif"><img src="<%=path%>/images/sywesp_17.gif" width="5" height="31" /></td>
                  <td background="<%=path%>/images/sywesp_18.gif" class="f_6">${codeMaintenanceType.name }</td>
                  <td width="5" align="right" valign="bottom" background="<%=path%>/images/sywesp_18.gif"><img src="<%=path%>/images/sywesp_19.gif" width="5" height="31" /></td>
                </tr>
            </table></td>
            <td align="right" valign="bottom"><a href="javascript:window.location.href='<%=path %>/findAllCodeMaintenanceTypeCodeMaintenanceAction.action';" style="text-decoration:none;">【 返 回 】</a>&nbsp;&nbsp;<c:if test="${codeMaintenanceType.codeId=='documentmessage'}"><a href="javascript:doAddCode1('${codeMaintenanceType.codeId}')"></c:if><c:if test="${codeMaintenanceType.codeId!='documentmessage'}"><a href="javascript:doAddCode('${codeMaintenanceType.codeId}')"></c:if><span style="vertical-align: middle;"></span><img src="<%=path%>/images/icon_18.gif" width="15" height="15" border="0" /></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </td>
          </tr>
          <tr>
            <td colspan="2" align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td width="2" height="24" align="left" background="<%=path%>/images/sywesp_21.gif"><img src="<%=path%>/images/sywesp_20.gif" width="2" height="24" /></td>
                      <td align="left" background="<%=path%>/images/sywesp_21.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <td width="8%" align="left" class="f_8">序号</td>
                            <td width="21%" align="left" class="f_8">值</td>
                            <td width="63%" align="left" class="f_8"><img src="<%=path%>/images/sywesp_23.gif" width="8" height="22" align="absmiddle" />选项</td>
                            <td width="8%" align="left" class="f_8"><img src="<%=path%>/images/sywesp_23.gif" width="8" height="22" align="absmiddle" /><c:if test="${requestScope.ISIUD eq '0'}">操作</c:if></td>
                          </tr>
                      </table></td>
                      <td width="4" align="right" background="<%=path%>/images/sywesp_21.gif"><img src="<%=path%>/images/sywesp_22.gif" width="4" height="24" /></td>
                    </tr>
                </table></td>
              </tr>
              <tr>
                <td align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td height="25" align="left" valign="top" class="tb_7"><table width="100%" border="0" cellspacing="1" cellpadding="0">
                      <c:if test="${! empty requestScope.CODESELECT}">
                      <c:forEach items="${requestScope.CODESELECT}" var="codeSelect">
                          <tr onmouseover="this.style.backgroundColor='d4d0c7'" onmouseout="this.style.backgroundColor=''">
                            <td width="8%" align="left" valign="bottom">&nbsp;&nbsp;${codeSelect.sort}</td>
                            <td width="21%" height="25" align="left" valign="bottom">${codeSelect.value }</td>
                            <td width="63%" align="left" valign="bottom">${codeSelect.name }</td>
                            <td width="8%" valign="bottom">
                            <c:if test="${requestScope.ISIUD eq '0'}">
                            <c:if test="${codeMaintenanceType.codeId=='documentmessage'}">
                            <a href="javascript:doUpdateCode1('${codeMaintenanceType.codeId}','${codeSelect.valueId}')" style="text-decoration:none;"></c:if><c:if test="${codeMaintenanceType.codeId!='documentmessage'}"><a href="javascript:doUpdateCode('${codeMaintenanceType.codeId}','${codeSelect.valueId}')" style="text-decoration:none;"></c:if>
                            <img src="<%=path%>/images/icon_5.gif" width="15" height="16" border="0"/>
                            </a>
                            <a onclick="return confirm('确定删除${codeSelect.name}选项？');" href="<%=path %>/deleteByCodeSelectIdCodeMaintenanceAction.action?codeSelect.valueId=${codeSelect.valueId }&codeMaintenanceType.codeId=${codeMaintenanceType.codeId }">
                            <img src="<%=path%>/images/icon_11.gif" width="12" height="12" border="0" />
                            </a>
                            </c:if>
                            </td>
                          </tr>
                      </c:forEach>
                      </c:if>
                      </table></td>
                    </tr>
                </table>
                  </td>
                    </tr>
                  </table></td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td height="5" colspan="2" align="left" valign="top"></td>
          </tr>
          <tr>
            <td colspan="2" align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td align="left" valign="top" class="tb_9 border_3"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td align="left"><img src="<%=path%>/images/icon_14.gif" width="62" height="17" /></td>
                    </tr>
                    <tr>
                      <td height="30" align="left" valign="bottom"><a href="#"><img src="<%=path%>/images/icon_18.gif" width="15" height="15" border="0" /></a> 表示对当前代码字段添加选项&nbsp;&nbsp; <a href="#"><img src="<%=path%>/images/icon_5.gif" width="15" height="16" border="0" /></a> 表示修改当前代码字段名称&nbsp;&nbsp;<a href="#"><img src="<%=path%>/images/icon_11.gif" width="12" height="12" border="0" /></a> 表示删除当前代码字段</td>
                    </tr>
                </table></td>
              </tr>
            </table></td>
          </tr>
          
        </table></td>
      </tr>
    </table>
  </body>
</html>
